package com.zhijian.medical.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 考核类型枚举类
 *
 * @author HCG
 * @version 1.0
 * @date 2022-11-09
 */
@AllArgsConstructor
@Getter
public enum AssessmentTypeEnum {

    EXAM(0, "题库"),
    DSC(1, "数字切片");

    private Integer code;
    private String desc;

    public static AssessmentTypeEnum getByCode(Integer code) {
        AssessmentTypeEnum[] dehydrationEnums = AssessmentTypeEnum.values();
        for (AssessmentTypeEnum anEnum : dehydrationEnums) {
            if (anEnum.getCode().equals(code)) {
                return anEnum;
            }
        }
        return null;
    }
}
